home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_enscript.idb / usr / freeware / share / enscript / hl / skill.st.z / skill.st
Encoding:
Text File  |  2002-04-08  |  7.0 KB  |  173 lines

  1. /**
  2.  * Name: skill
  3.  * Description: Cadence Design Systems lispy language.
  4.  * Author: Jean-Marc Calvez <jean-marc.calvez@st.com>
  5.  */
  6.  
  7. state skill extends HighlightEntry
  8. {
  9.   /* Line Comments (lispish). */
  10.   /;/ {
  11.     comment_face (true);
  12.     language_print ($0);
  13.     call (eat_one_line);
  14.     comment_face (false);
  15.   }
  16.  
  17.   /* Block Comments (C-style) */
  18.   /\/\*/ {
  19.     comment_face (true);
  20.     language_print ($0);
  21.     call (c_comment);
  22.     comment_face (false);
  23.   }
  24.  
  25.   /* String constants. */
  26.   /\"/ {
  27.     string_face (true);
  28.     language_print ($0);
  29.     call (c_string);
  30.     string_face (false);
  31.   }
  32.  
  33.   /* Definitions. */
  34.   /(\([ \t]*)(procedure|defmacro|mprocedure|nprocedure|defun)([ \t]+\(?)([!\$%&\*\/:<=>\?~_^a-zA-Z][!\$%&\*\/:<=>\?~_^a-zA-Z0-9.+\-]*)/ {
  35.     /* Starting garbage. */
  36.     language_print ($1);
  37.  
  38.     /* Keyword. */
  39.     keyword_face (true);
  40.     language_print ($2);
  41.     keyword_face (false);
  42.  
  43.     /* Middle garbage. */
  44.     language_print ($3);
  45.  
  46.     /* Function name. */
  47.     function_name_face (true);
  48.     language_print ($4);
  49.     function_name_face (false);
  50.   }
  51.  
  52.   /* Keywords. Taken from Skill Language in the Quick Ref.  + operators
  53.      (build-re '(@rest @optional @key abs acos add1 alias alphalessp
  54.      alphaNumCmp and append append1 apply arglist arrayp arrayref asin assoc
  55.      assq atan atom band bcdp bitfield bitfield bnand bnor bnot bor boundp
  56.      break breakpt buildString bxnor bxor caaar caadr caar cadr callInitProc
  57.      car case caseq cdar cddr cdr changeWorkingDir clear clearExitProcs close
  58.      compareTime compress concat cond cons cont continue copy
  59.      copyDefstructDeep cos count createDir csh debugQuit debugStatus declare
  60.      declareLambda declareNLambda defCapDepends defCapPrefixes defInitProc
  61.      defmacro defprop defstruct defstructp defun defUserInitProc defvar
  62.      deleteDir deleteFile difference drain dtpr dump ed edi edit edl encrypt
  63.      eq equal err error errset errsetstring eval evalstring evenp exists exit
  64.      exp expandMacro expt fileLength fileSeek fileTell fix fixp float floatp
  65.      for forall foreach fprintf fscanf gc gcsummary gensym get get_pname
  66.      get_string getAllLoadedFiles getc getchar getCurrentTime getd getDirFiles
  67.      getFnWriteProtect getFunctions getInstallPath getq getqq gets
  68.      getShellEnvVar getSkillPath getVarWriteProtect getVersion getWarn
  69.      getWorkingDir go geqp getq getqq greaterp if ilToolBox index infile
  70.      installDebugger instring isCallable isDir isExecutable isFile
  71.      isFileEncrypted isFileName isLink isReadable isWritable lambda last lconc
  72.      leftshift length leqp lessp let lineread linereadstring list
  73.      listFunctions listp listVariables load loadContext loadi loadstring log
  74.      lowerCase makeTable makeTempFileName map mapc mapcan mapcar maplist max
  75.      measureTime member memq min minus minusp mod mprocedure nconc ncons
  76.      needCells neq nequal newline next nil nindex nlambda nprocedure nth
  77.      nthcdr nthelem null numberp numOpenFiles oddp onep or otherp outfile
  78.      parseString plist plus plusp portp postdecrement postincrement pp pprint
  79.      predecrement preincrement prependInstallPath print printf printFunctions
  80.      printlev println printstruct printVariables procedure profile
  81.      profileReset profileSummary prog prog1 prog2 progn putd putprop putpropq
  82.      putpropqq quote quotient random range readTable regExitAfter
  83.      regExitBefore remd remdq remExitProc remove remprop remq return reverse
  84.      rexCompile rexExecute rexMagic rexMatchAssocList rexMatchList rexMatchp
  85.      rexReplace rexSubstitute rightshift rindex round rplaca rplacd
  86.      saveContext set setarray setContext setFnWriteProtect setof setplist setq
  87.      setqbitfield steqbitfield1 setShellEnvVar setSkillPath setVarWriteProtect
  88.      sh shell simplifyFilename sin skDisableMessage skIgnoreMessage
  89.      skillDebugger sklint skUnignoreMessage sort sortcar sprintf sqrt srandom
  90.      sstatus stacktrace status step stepout strcat strcmp stringp
  91.      stringToFunction strlen strncat strncmp sub1 subst substring sxtd symbolp
  92.      symeval symstrp tablep tableToList tailp tan tconc terpri times tracef
  93.      tracep tracev type typep unalias unbreakpt uncount uninstallDebugger
  94.      unless unprofile untrace untracep untracev upperCase warn when where
  95.      whereis while writeTable xcons zerop zxtd))
  96.    */
  97.   /\b(@(key|optional|rest)\
  98. |a(bs|cos|dd1|l(ias|pha(NumCmp|lessp))|nd|pp(end(|1)|ly)\
  99. |r(glist|ray(p|ref))|s(in|s(oc|q))|t(an|om))\
  100. |b(and|cdp|itfield()|n(and|o(r|t))|o(r|undp)|reak(|pt)|uildString\
  101. |x(nor|or))\
  102. |c(a(a(ar|dr|r)|dr|llInitProc|r|se(|q))|d(ar|dr|r)|hangeWorkingDir\
  103. |l(ear(|ExitProcs)|ose)\
  104. |o(mp(areTime|ress)|n(cat|d|s|t(|inue))|py(|DefstructDeep)|s|unt)\
  105. |reateDir|sh)\
  106. |d(e(bug(Quit|Status)|clare(|Lambda|NLambda)\
  107. |f(Cap(Depends|Prefixes)|InitProc|UserInitProc|macro|prop|struct(|p)|un\
  108. |var)\
  109. |lete(Dir|File))\
  110. |ifference|rain|tpr|ump)\
  111. |e(d(|i(|t)|l)|ncrypt|q(|ual)|rr(|or|set(|string))|v(al(|string)|enp)\
  112. |x(i(sts|t)|p(|andMacro|t)))\
  113. |f(i(le(Length|Seek|Tell)|x(|p))|loat(|p)|or(|all|each)|printf|scanf)\
  114. |g(c(|summary)\
  115. |e(nsym|qp\
  116. |t(|AllLoadedFiles|CurrentTime|DirFiles|F(nWriteProtect|unctions)\
  117. |InstallPath|S(hellEnvVar|killPath)|V(arWriteProtect|ersion)\
  118. |W(arn|orkingDir)|_(pname|string)|c(|har)|d|q(|q())|s))\
  119. |o|reaterp)\
  120. |i(f|lToolBox|n(dex|file|st(allDebugger|ring))\
  121. |s(Callable|Dir|Executable|File(|Encrypted|Name)|Link|Readable|Writable))\
  122. |l(a(mbda|st)|conc|e(ftshift|ngth|qp|ssp|t)\
  123. |i(neread(|string)|st(|Functions|Variables|p))\
  124. |o(ad(|Context|i|string)|g|werCase))\
  125. |m(a(keT(able|empFileName)|p(|c(|a(n|r))|list)|x)|e(asureTime|m(ber|q))\
  126. |in(|us(|p))|od|procedure)\
  127. |n(con(c|s)|e(edCells|q(|ual)|wline|xt)|i(l|ndex)|lambda|procedure\
  128. |th(|cdr|elem)|u(ll|m(OpenFiles|berp)))\
  129. |o(ddp|nep|r|therp|utfile)\
  130. |p(arseString|l(ist|us(|p))|o(rtp|st(decrement|increment))|p(|rint)\
  131. |r(e(decrement|increment|pendInstallPath)\
  132. |int(|Functions|Variables|f|l(ev|n)|struct)\
  133. |o(cedure|file(|Reset|Summary)|g(|1|2|n)))\
  134. |ut(d|prop(|q(|q))))\
  135. |quot(e|ient)\
  136. |r(an(dom|ge)\
  137. |e(adTable|gExit(After|Before)|m(ExitProc|d(|q)|ove|prop|q)|turn|verse\
  138. |x(Compile|Execute|Ma(gic|tch(AssocList|List|p))|Replace|Substitute))\
  139. |i(ghtshift|ndex)|ound|plac(a|d))\
  140. |s(aveContext\
  141. |et(|Context|FnWriteProtect|S(hellEnvVar|killPath)|VarWriteProtect|array\
  142. |of|plist|q(|bitfield))\
  143. |h(|ell)|i(mplifyFilename|n)\
  144. |k(DisableMessage|IgnoreMessage|UnignoreMessage|illDebugger|lint)\
  145. |ort(|car)|printf|qrt|random|status\
  146. |t(a(cktrace|tus)|e(p(|out)|qbitfield1)\
  147. |r(c(at|mp)|ing(ToFunction|p)|len|nc(at|mp)))\
  148. |ub(1|st(|ring))|xtd|ym(bolp|eval|strp))\
  149. |t(a(ble(ToList|p)|ilp|n)|conc|erpri|imes|race(f|p|v)|ype(|p))\
  150. |u(n(alias|breakpt|count|installDebugger|less|profile|trace(|p|v))\
  151. |pperCase)\
  152. |w(arn|h(e(n|re(|is))|ile)|riteTable)|xcons|z(erop|xtd))\b/ {
  153.     keyword_face (true);
  154.     language_print ($0);
  155.     keyword_face (false);
  156.   }
  157.  
  158.   /* Skill functions. Use prefix to match, they are too many to
  159.      enumerate. Used bold-italic... */
  160.   /(cdf|dag|db|de|df|dl|dm|enter|fm|ge|hi|mif|tc|tfc|sch)[A-Z][^ \t]*/ {
  161.     bold_italic (true);
  162.     language_print ($0);
  163.     bold_italic (false);
  164.   }
  165. }
  166.  
  167.  
  168. /*
  169. Local variables:
  170. mode: c
  171. End:
  172. */
  173.